@extends('layouts.tankuang')

@section('content')
        <form name="add_form" id="add_form" action="{{url('admin/xs/edit')}}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <div id="div_print">
                <h2 class="text-center mg_b36 mg_t25" style="font-weight:bold;">线索举报</h2>

                <table class="table-form table-border w mg-auto">
                    <tbody>
                    <tr>
                        <td class="font-bd" width="12%">单位名称</td>
                        <td colspan="5"><input type="text" class="form-input w" value="{{$units->name}}" name="dwmc" readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif></td>
                    </tr>

                     <tr>
                        <td class="font-bd">姓名</td>
                        <td>
                             <input type="text" class="form-input w" value="{{$re->jbr}}" name="jbr"  readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif>
                        </td>
                        <td class="font-bd">联系电话</td>
                        <td>
                            <input type="text" class="form-input w" value="{{$re->lxdh}}" name="lxdh"  readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif>
                        </td>
                    </tr>
                     <tr>
                         <td class="font-bd">举报时间</td>
                         <td>
                             <input class="easyui-datetimebox w153" value="{{$re->jbsj}}" name="jbsj" readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif>
                        </td>
                         <td class="font-bd">举报对象</td>

                          <td>
                            <input type="text" class="form-input w" @if($re->jbdx == 1)value="单位"@endif @if($re->jbdx == 2)value="个人"@endif  @if($re->jbdx == 3)value="社会"@endif      readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif>
                          </td>
            
                    </tr>
                     <tr>
                        <td class="font-bd">内容</td>
                        <td colspan="5"><textarea class="textarea" name="jbnr" class="form-input w"  readonly   @if(Auth::guard('admin')->user()->role_id != 22) disabled @endif >{{$re->jbnr}}</textarea></td>
                    </tr>
					<tr>
                    	<td>照片</td>
                    	<td colspan="3">
                         @if($re->jbwj)
                    		<div class="example  col-md-12 col-xs-12 "><img src="{{ URL::asset('/') }}{{$re->jbwj}}" class="img-rounded" alt="" width="50"></div>
                            @endif
                    	</td>
                    </tr>
                    </tbody>
                </table>

                <link rel="stylesheet" href="{{ URL::asset('/') }}css/zoomify.min.css">
                            <script src="{{ URL::asset('/') }}js/zoomify.min.js"></script>
                            <script type="text/javascript">
                                $('.example img').zoomify(function(){
                                    $(this).css({'position':'absolute','top':0,'bottom':0,'left':0,'right':0,'z-index':'9999',})
                                });
                </script>







                <h2 class="text-center mg_b36 mg_t25" style="font-weight:bold;">举报回复</h2>
                <table class="table-form table-border w mg-auto">
                    <tbody>

                        <tr>
                        <td class="font-bd">处理时间</td>
                        <td>
                            {{$re->clsj}}
                        </td>
                        <td class="font-bd">县市区、派出所</td>
                        <td colspan="3">
                            {{$re->cldz}}
                        </td>
                    </tr>



                    
                    <tr>
                        <td class="font-bd">处理单位</td>
                        <td colspan="5">
                            {{$re->cldw}}
                        </td>
                    </tr>

                     <tr>
                        <td class="font-bd">经办人</td>
                        <td>
                            {{$re->clry}}
                        </td>
                        <td class="font-bd">联系电话</td>
                        <td colspan="3">
                            {{$re->cldh}}
                        </td>
                    </tr>


                     <tr>
                        <td class="font-bd">核查结果</td>
                        <td colspan="5">
                            {{$re->clqk}}
                        </td>
                    </tr>
       
                    </tbody>
                </table>

            
                <div class="w wbt mg_t25 pd_b20 text-center">
                    <!-- <button id="go" type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-save'">确定</button> -->

                    <button type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-no'" onclick="$('#w').window('close')">关闭</button>
                </div>
            </div>
        </form>
            
        <script type="text/javascript">
            $(document).on("change",'#city', function(){

                $('#area option:gt(0)').remove();
                $('#org_id option:gt(0)').remove();
                //alert(1);die;
                var cid = $("#city").val();
                var url = "{{url('admin/getArea')}}";
                $.getJSON(url,{cid:cid},function(json){
                    /*清空原有的选项*/
                    if(json != ''){
                        $.each(json,function(index,array){
                            var option = "<option value='"+array['id']+"'";
                            option += ">"+array['name']+"</option>";
                            $("#area").append(option);
                        });
                    }
                });
            });

            $(document).on("change",'#area', function(){
                $('#org_id option:gt(0)').remove();
                var cid = $("#area").val();
                var url = "{{url('admin/getArea')}}";
                $.getJSON(url,{cid:cid},function(json){
                    /*清空原有的选项*/
                    if(json != ''){
                        $.each(json,function(index,array){
                            var option = "<option value='"+array['id']+"'";
                            option += ">"+array['name']+"</option>";
                            $("#org_id").append(option);
                        });
                    }
                });
            });
        </script>

        <script>
            $('#go').click(function (){
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "{{url('admin/xs/edit',$id)}}",
                    data: $('#add_form').serialize(),
                    async: false,
                    success: function(data) {
                        if(data.status == 1){
                            $.messager.alert('信息提示',data.msg,'info');
                            $('#adbg').dialog('close');
                            $('.pagination-load').click();
                        }else {
                            $.messager.alert('信息提示',data.msg,'info');
                        }
                    }
                });
            });
        </script>



@stop